package jm.demo.auth.domain;

import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;
import java.net.URI;
import java.util.Date;

import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.ResponseBuilder;
import javax.xml.bind.SchemaOutputResolver;
import javax.xml.transform.Result;
import javax.xml.transform.stream.StreamResult;

public class MyMain {
	
	Writer writer = new StringWriter();
	
	class MySchemaOutputResolver extends SchemaOutputResolver {
	    public Result createOutput( String namespaceUri, String suggestedFileName ) throws IOException {
	        return new StreamResult(writer);
	    }
	}

    /**
     * @param args
     */
    public static void main(String[] args) {
//        org.springframework.util.AntPathMatcher matcher = new org.springframework.util.AntPathMatcher();
//        System.out.println("a*, abc = " + matcher.match("a*", "abc"));
//        System.out.println("a*b, abc = " + matcher.match("a*b", "abc"));
//        System.out.println("a*b, ab = " + matcher.match("a*b", "ab"));
//        System.out.println("a*b, adb = " + matcher.match("a*b", "adb"));
        
        URI uri = URI.create("http://www.baidu.com");
        
        ResponseBuilder builder = Response.created(uri);
        builder.expires(new Date()).header("X-JM-SIGN", "Jiming Liu");
        builder.build();
        
        System.out.println(uri);
        
    }

}
